package com.x.aoki.config.client3366.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 配置中心的配置的读取主控制器类
 *
 * @author caoy
 * @date 2025-02-18 13:49:11
 */
@RestController
// 添加 RefreshScope 注解
@RefreshScope
public class ConfigController {
    @Value("${ccc.yyy}")
    private String cccYyy;

    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/configInfo")
    public String getConfigInfo(){
        return " 【"+cccYyy+"】 ,端口号为："+serverPort;
    }
}
